# -*- coding: utf-8 -*-
"""mysite URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/1.11/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  url(r'^$', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  url(r'^$', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.conf.urls import url, include
    2. Add a URL to urlpatterns:  url(r'^blog/', include('blog.urls'))
"""
from django.conf.urls import url

from . import base_views
from smAdmin.views import enterprise
from smAdmin.views import check
from smAdmin.views import statistics
from smAdmin.views import sysconf

urlpatterns = [
	url(r'^test$', base_views.test),

	url(r'^login', base_views.login_view, name='login'),
	url(r'^api/login$', base_views.api_login),
	url(r'^logout$', base_views.logout_view, name='logout'),
	# 用户信息
	url(r'^user/profile$', base_views.profile_view, name='profile'),
	# 修改密码
	url(r'^user/change_pwd', base_views.change_pwd_view, name='change_pwd'),
	url(r'^api/change_pwd$', base_views.api_change_pwd, name='api_change_pwd'),

	url(r'^FileUpload$', base_views.FileUpload, name='FileUpload'),

	url(r'^main$', base_views.main_view, name='main'),
	url(r'^dashboard$', base_views.dashboard_view, name='main'),

	# 企业列表
	url(r'^enterprise/erpinfo$', enterprise.erpinfo, name='erpinfo'),
	url(r'^enterprise/erpinfo_list$', enterprise.erpinfo_list, name='erpinfo_list'),
	url(r'^enterprise/erpinfo_edit$', enterprise.erpinfo_edit, name='erpinfo_edit'),
	url(r'^enterprise/erpinfo_detail$', enterprise.erpinfo_detail, name='erpinfo_detail'),

	# 企业账号详情
	url(r'^enterprise/account_detail$', enterprise.account_detail, name='account_detail'),

	# 品牌列表
	url(r'^enterprise/brand$', enterprise.brand, name='brand'),
	url(r'^enterprise/brand_list$', enterprise.brand_list, name='brand_list'),
	url(r'^enterprise/brand_edit$', enterprise.brand_edit, name='brand_edit'),
	url(r'^enterprise/brand_detail$', enterprise.brand_detail, name='brand_detail'),

	# 产品列表
	url(r'^enterprise/product$', enterprise.product, name='product'),
	url(r'^enterprise/product_list$', enterprise.product_list, name='product_list'),
	url(r'^enterprise/product_edit$', enterprise.product_edit, name='product_edit'),
	url(r'^enterprise/product_detail$', enterprise.product_detail, name='product_detail'),

	# 原料列表
	url(r'^enterprise/material$', enterprise.material, name='material'),
	url(r'^enterprise/material_list$', enterprise.material_list, name='material_list'),
	url(r'^enterprise/material_edit$', enterprise.material_edit, name='material_edit'),
	url(r'^enterprise/material_detail$', enterprise.material_detail, name='material_detail'),

	# 订单列表
	url(r'^enterprise/order$', enterprise.order, name='order'),
	url(r'^enterprise/order_list$', enterprise.order_list, name='order_list'),
	url(r'^enterprise/order_edit$', enterprise.order_edit, name='order_edit'),
	url(r'^enterprise/order_detail$', enterprise.order_detail, name='order_detail'),
	url(r'^enterprise/order_pay_ok$', enterprise.order_pay_ok, name='order_pay_ok'),

	# ==================审核==================
	# 审核企业信息
	url(r'^check/erpinfo$', check.erpinfo, name='check_erpinfo'),
	url(r'^check/erpinfo_list$', check.erpinfo_list, name='check_erpinfo_list'),
	url(r'^check/erpinfo_edit$', check.erpinfo_edit, name='check_erpinfo_edit'),
	url(r'^check/erpinfo_detail$', check.erpinfo_detail, name='check_erpinfo_detail'),
	url(r'^check/erpinfo_submit_check_result$', check.erpinfo_submit_check_result, name='erpinfo_submit_check_result'),

	# 审核品牌
	url(r'^check/brand$', check.brand, name='check_brand'),
	url(r'^check/brand_list$', check.brand_list, name='check_brand_list'),
	url(r'^check/brand_edit$', check.brand_edit, name='check_brand_edit'),
	url(r'^check/brand_detail$', check.brand_detail, name='check_brand_detail'),
	url(r'^check/brand_submit_check_result$', check.brand_submit_check_result, name='brand_submit_check_result'),

	# 审核产品
	url(r'^check/product$', check.product, name='check_product'),
	url(r'^check/product_list$', check.product_list, name='check_product_list'),
	url(r'^check/product_edit$', check.product_edit, name='check_product_edit'),
	url(r'^check/product_detail$', check.product_detail, name='check_product_detail'),
	url(r'^check/product_submit_check_result$', check.product_submit_check_result, name='product_submit_check_result'),

	# ============= 数据统计 ===========
	# 扫码记录
	url(r'^statistics/scan_log$', statistics.scan_log, name='scan_log'),
	url(r'^statistics/scan_log_list', statistics.scan_log_list, name='scan_log_list'),
	url(r'^statistics/scan_log_detail', statistics.scan_log_detail, name='scan_log_detail'),

	# 实时统计
	url(r'^statistics/realtime$', statistics.realtime, name='realtime'),
	url(r'^statistics/realtime_chart$', statistics.realtime_chart, name='realtime_chart'),

	# 地域分布
	url(r'^statistics/region$', statistics.region, name='region'),
	url(r'^statistics/region_chart$', statistics.region_chart, name='region_chart'),

	# =============权限设置===========
	# 用户
	url(r'^setting/user$', base_views.setting_user, name='setting_user'),
	url(r'^setting/user_list$', base_views.setting_user_list, name='setting_user_list'),
	url(r'^setting/user_edit$', base_views.setting_user_edit, name='setting_user_edit'),

	# 用户组
	url(r'^setting/group$', base_views.setting_group, name='setting_group'),
	url(r'^setting/group_list$', base_views.setting_group_list, name='setting_group_list'),
	url(r'^setting/group_edit$', base_views.setting_group_edit, name='setting_group_edit'),
	url(r'^setting/group_set_permission_view$', base_views.group_set_permission_view, name='group_set_permission_view'),
	url(r'^setting/group_set_permissions$', base_views.group_set_permissions, name='group_set_permissions'),

	# 权限
	url(r'^setting/permission$', base_views.setting_permission, name='setting_permission'),
	url(r'^setting/permission_list$', base_views.setting_permission_list, name='setting_permission_list'),
	url(r'^setting/permission_edit$', base_views.setting_permission_edit, name='setting_permission_edit'),

	# ============= 系统配置 ===========
	# 微信公众号
	url(r'^sysconf/wxmp_conf$', sysconf.wxmp_config, name='wxmp_config'),
	url(r'^sysconf/wxmp_conf_list$', sysconf.wxmp_config_list, name='wxmp_config_list'),
	url(r'^sysconf/wxmp_conf_edit$', sysconf.wxmp_config_edit, name='setting_user_edit'),
	url(r'^sysconf/wxmp_conf_detail$', sysconf.wxmp_config_detail, name='wxmp_config_detail'),
	url(r'^sysconf/wxmp_config_set_value$', sysconf.wxmp_config_set_value, name='wxmp_config_set_value'),

	# 溯码平台配置
	url(r'^sysconf/smplat_conf$', sysconf.smplat_config, name='smplat_config'),
	url(r'^sysconf/smplat_conf_list$', sysconf.smplat_config_list, name='smplat_config_list'),
	url(r'^sysconf/smplat_conf_edit$', sysconf.smplat_config_edit, name='setting_user_edit'),
	url(r'^sysconf/smplat_conf_detail$', sysconf.smplat_config_detail, name='smplat_config_detail'),
	url(r'^sysconf/smplat_config_set_value$', sysconf.smplat_config_set_value, name='smplat_config_set_value'),

	# 溯码后台配置
	url(r'^sysconf/smadmin_conf$', sysconf.smadmin_config, name='smadmin_config'),
	url(r'^sysconf/smadmin_conf_list$', sysconf.smadmin_config_list, name='smadmin_config_list'),
	url(r'^sysconf/smadmin_conf_edit$', sysconf.smadmin_config_edit, name='setting_user_edit'),
	url(r'^sysconf/smadmin_conf_detail$', sysconf.smadmin_config_detail, name='smadmin_config_detail'),
	url(r'^sysconf/smadmin_config_set_value$', sysconf.smadmin_config_set_value, name='smadmin_config_set_value'),

]
